package com.lovo.testjpa.controller;

import com.lovo.testjpa.bean.Student;
import com.lovo.testjpa.result.ResponseResult;
import com.lovo.testjpa.service.StudentService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@ResponseResult
@RequestMapping("/students")
@Tag(name = "学生管理StudentController")
public class StudentController {
    @Autowired
    private StudentService studentService;
    @GetMapping
    @Operation(summary = "查询学生")
    public Object listStudent(Integer current,Integer pageSize){
        return studentService.listStudent(current,pageSize,new Student());
    }
}
